﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace War
	{
	class Program
		{
		static void Main(string[] args)
			{
			Random rand = new Random();
			int myWins = 0;
			int compWins = 0;
			int draws = 0;
			Deck myDeck = new Deck(rand);
			Deck compDeck = new Deck(rand);

			Card myCard;
			Card compCard;

			myDeck.NewDeck();
			compDeck.NewDeck();
			while (myDeck.CardsLeft > 0)
				{
				myCard = myDeck.DealCard();
				compCard = compDeck.DealCard();
				//Console.WriteLine("Computer card is a {0} of {1}", compCard.Value, compCard.Suit);
				Console.Write("Computer card is a ");
				compCard.displayCard();
				//Console.WriteLine("Your card is a {0} of {1}", myCard.Value, myCard.Suit);
				Console.Write("My card is a ");
				myCard.displayCard();
				if (myCard.Value > compCard.Value)
					{
					myWins++;
					}
				else if (compCard.Value > myCard.Value)
					{
					compWins++;
					}
				else
					draws++;
				Console.WriteLine("Wins {0}, Loses {1}, Draws {2}",myWins,compWins,draws);
				Console.ReadLine();
				}
			}
		}
	}
